package com.example.nonacademic_education.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.nonacademic_education.data.request.ProjectExcelVo;
import com.example.nonacademic_education.data.request.ProjectList;
import com.example.nonacademic_education.entity.Project;
import com.example.nonacademic_education.util.R;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

/**
 * @Author:yanghua
 * @Date:2023/4/18 19:43
 */
public interface ProjectService extends IService<Project> {
    /**
     * 添加
     * @param project
     * @return
     */
    R addOne(Project project);

    /**
     * 删除
     * @param id
     * @return
     */
    R deleteOne(Long id);

    /**
     * 修改
     * @param project
     * @return
     */
    R updateOne(Project project);

    /**
     * 条件查询
     * @param projectList
     * @return
     */
    R getList(ProjectList projectList,Integer item);

    /**
     * 只查询id和name
     * @param projectList
     * @return
     */
    R getIdAndName(ProjectList projectList);

    void exportStatisticsExcel(ProjectExcelVo projectExcelVo, HttpServletResponse response) throws IOException;

    void getTemplate(HttpServletResponse response) throws IOException;

    R importProject(MultipartFile file) throws IOException;
}
